What do you believe about Programming Languages (that you can't prove (yet))?

The Edge "World Question Center asks the thought provoking, but overly general for this forum, question "WHAT DO YOU BELIEVE IS TRUE EVEN THOUGH YOU CANNOT PROVE IT?"

So let's tailor it a little for LtU...

What do you believe about Programming Languages (that you can't prove (yet))?

A Language-Based Approach to Unifying Events and Threads

A Language-Based Approach to Unifying Events and Threads

This paper presents a language based technique to unify two seemingly opposite programming models for building massively concurrent network services: the event driven model and the multithreaded model. The result is a unified concurrency model providing both thread abstractions and event abstractions.

The implementation uses the CPS monad in such a way that the final result is a trace, that is, an ordered sequence of function calls. Threading is part of the basic monad implementation, and a scheduler is as simple as a tree traversal function over a queue of traces. Once you have a scheduler, events are obvious.

This is quite elegant, I'll start using it for my own applications as soon as I get hold of the source.

Rethinking Linguistic Relativity

We discussed the Sapir-Whorf Hypothesis (also called the Linguistic Relativity Hypothesis) many times, and it is a topic that is worth revisiting if you are interested in the way language influences mind. While it is true that what we know about natural languages doesn't have to match the way programming languages influence our programming style, it is still worthwhile to discuss the possibility.

For many years Sapir-Whorf was considered very problematic, since empirical findings didn't seem to support the theory: no real cognitive differences that could be attributed to language were found. More recently, linguistic relativity became more respectable, and indeed important work is being done in this field.

I suggest reading Gumperz and Levinson's introduction from the book they edited Rethinking Linguistic Relativity (1996, Cambridge University Press).

Also from Levinson is Language and mind: Let’s get the issues straight! from the 2003 book Language in mind: Advances in the study of language and cognition (D. Gentner & S. Goldin-Meadow, eds.)

Implementation of Hecl

The Hecl scripting language as a programming language isn't something that's pushing programming language design in interesting new directions. However, as a simple, dynamic language that's implemented in Java, it's pretty easy to figure out how it works, so perhaps this article on its design and implementation is of interest to those who aren't quite as advanced or passionate as most of the LtU readership, or who are interested in something to sink their teeth into before wading into something more difficult.

Additionally, because of the very fact that it is small and simple, it has a practical application: the runtime runs on even older, slower J2ME-enabled cell phones.

I originally wrote the article for a European Linux magazine, but didn't like their terms, so I decided to just put it up on my web site:

http://www.dedasys.com/articles/hecl_implementation.html

Oberon Script. A Lightweight Compiler and Runtime System for the Web

Oberon Script. A Lightweight Compiler and Runtime System for the Web. Ralph Sommerer

Oberon Script is a scripting language and runtime system for building interactive Web Client applications. It is based on the Oberon programming language and consists of a compiler that translates Oberon Script at load-time into JavaScript code, and a small runtime system that detects and compiles script sections written in Oberon Script.

People outside our field often don't relaize just how easy it is to implement languages: This project, for example, uses a recursive descent parser, and the entire compiler is 1081 lines of Javascript code.

Build your own scripting language for Java

JavaWorld has An introduction to JSR 223 for those that want to roll their own and target the JVM:

The upcoming Java Standard Edition 6.0 release will include an implementation of Java Specification Request 223, Scripting for the Java Platform. This JSR is about programming languages and their integration with Java. This article demonstrates the power and potential of JSR 223 through the implementation of a simple Boolean language.

Past LtU references to JSR 223: The original announcement in Sun, Zend push scripting for Java and a brief mention in the thread on Embedded Languages in Java.

I miss you guys...

It's been awhile since you posted. You know it, and I know it. Feeling a little guilty now?! You should :-)

If you are an editor or a long time member and haven't posted for some time, chances are I am sitting here wondering where you are and what you are up to. So are many of your fans among the LtU readership whom you are probably unaware of.

In fact several key contributors are MIA. I am not going to name names, but you know who you are.

If there are issues I need to be aware of, how about dropping a line? Otherwise, just know that your absence has been noticed...

P.S.

Longtime members wishing to join the editorial team are welcome, as always. Just let me know.

Deconstructing Process Isolation

Deconstructing Process Isolation.
Mark Aiken; Manuel Fahndrich; Chris Hawblitzel; Galen Hunt; James R. Larus. April 2006

Most operating systems enforce process isolation through hardware protection mechanisms such as memory segmentation, page mapping, and differentiated user and kernel instructions. Singularity is a new operating system that uses software mechanisms to enforce process isolation. A software isolated process (SIP) is a process whose boundaries are established by language safety rules and enforced by static type checking. With proper system support, SIPs can provide a low cost isolation mechanism that provides failure isolation and fast inter-process communication. To compare the performance of Singularity’s approach against more conventional systems, we implemented an optional hardware isolation mechanism. Protect domains are hardware-enforced address spaces, which can contain one or more SIPs. Domains can either run at the kernel’s privilege levels and share an exchange heap or be fully isolated from the kernel and run at the normal application privilege level. These domains can construct Singularity configurations that are similar to micro-kernel and monolithic kernel systems.

The paper concludes that hardware-based isolation incurs performance costs of up to 25-33%, while the lower cost of SIPs permits them to provide protection and failure isolation at a finer granularity than conventional processes.

Maybe it's time to revist the language-as-os theme...

ACM Queuecast: systems on a chip

This one is a podcast and the sound quality isn't great, but some of you might still be interested in listening.

Advances in chip architectures may seem quite esoteric to those working on semantics of high level languages, but they do have an impact on how languages are implemented, and which implementations (and languages) survive and prosper.

The implications SoC architectures have on compilers are discussed briefly at around the 10 minute mark. The implications for application level security, near the 16 minute mark. I think the discussion of security might interest the E folks, and people from the proof-carrying-code world.

New Common Lisp FAQ

Seems there's a new Common Lisp FAQ in the works.

The entries may be of interest even if you aren't a Lisp programmer. Highlights: a detailed discussion on parentheses, and a section on Lisp nomenclature.

Note that many more entries can be found in the FAQ staging area.